# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=bumprace
pkgver=1.5.8
pkgrel=1
pkgdesc="1 or 2 players race through a multi-level maze"
url="http://www.linux-games.com/bumprace/"
arch="all"
license="GPL-2.0-only"
depends="$pkgname-data"
makedepends="sdl12-compat-dev sdl_image-dev sdl_mixer-dev libjpeg-turbo-dev libzip-dev"
subpackages="$pkgname-data::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/karlb/bumprace/archive/$pkgver.tar.gz
	bumprace.desktop
	bumprace-icon.xpm
	"

prepare() {
	default_prepare
	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--sbindir=/usr/bin
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/bumprace.desktop \
	"$pkgdir"/usr/share/applications/bumprace.desktop
	install -Dm664 "$srcdir"/bumprace-icon.xpm \
	"$pkgdir"/usr/share/pixmaps/bumprace-icon.xpm
}

data() {
	pkgdesc="$pkgdesc (data files)"
	amove usr/share/bumprace
}

sha512sums="
bffc1d829deb048644fa21eb4566e2008573c0ee2e6f96e75470c8a6fa4cacb788cb93adf6e24b53f32884fd999880ffc527a903ce617a376cb5aae4c1b97480  bumprace-1.5.8.tar.gz
7042f9dd077c823234eed7fdb863d6d4af4c42f2385bd1f5208052f6144a007e89a01e6e8bace04426bae3ea605c64980c538c9f3d29820d8331a511cbacfb1d  bumprace.desktop
380e6231951e27a47dab274e6cee1443d2cec53f0da48e5cf01dca5e2d3b1634c733427403bb8c384b6272fe5d60fc0eb2d2dc9a626e0ef013076b0521cb6ce0  bumprace-icon.xpm
"
